home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Macintosh Programmer’s Workshop / MPW 3.1 / MPW / Interfaces / CIncludes / Video.h < prev    next >
Text File  |  1990-12-13  |  5KB  |  143 lines

  1. /************************************************************
  2.  
  3. Created: Thursday, September 7, 1989 at 8:20 PM
  4.     Video.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.    1986-1989
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __VIDEO__
  15. #define __VIDEO__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #endif
  20.  
  21. #define mBaseOffset 1        /*Id of mBaseOffset.*/
  22. #define mRowBytes 2         /*Video sResource parameter Id's */
  23. #define mBounds 3            /*Video sResource parameter Id's */
  24. #define mVersion 4            /*Video sResource parameter Id's */
  25. #define mHRes 5             /*Video sResource parameter Id's */
  26. #define mVRes 6             /*Video sResource parameter Id's */
  27. #define mPixelType 7        /*Video sResource parameter Id's */
  28. #define mPixelSize 8        /*Video sResource parameter Id's */
  29. #define mCmpCount 9         /*Video sResource parameter Id's */
  30. #define mCmpSize 10         /*Video sResource parameter Id's */
  31. #define mPlaneBytes 11        /*Video sResource parameter Id's */
  32. #define mVertRefRate 14     /*Video sResource parameter Id's */
  33. #define mVidParams 1        /*Video parameter block id.*/
  34. #define mTable 2            /*Offset to the table.*/
  35. #define mPageCnt 3            /*Number of pages*/
  36. #define mDevType 4            /*Device Type*/
  37. #define oneBitMode 128        /*Id of OneBitMode Parameter list.*/
  38. #define twoBitMode 129        /*Id of TwoBitMode Parameter list.*/
  39. #define fourBitMode 130     /*Id of FourBitMode Parameter list.*/
  40. #define eightBitMode 131    /*Id of EightBitMode Parameter list.*/
  41. #define cscReset 0            /*Control Codes*/
  42. #define cscSetMode 2        /*Control Codes*/
  43. #define cscSetEntries 3     /*Control Codes*/
  44. #define cscGrayPage 5
  45. #define cscSetGray 6
  46. #define cscGetMode 2        /*Status Codes*/
  47. #define cscGetEntries 3     /*Status Codes*/
  48. #define cscGetPageCnt 4     /*Status Codes*/
  49. #define cscGetPageBase 5    /*Status Codes*/
  50.  
  51. struct VPBlock {
  52.     long vpBaseOffset;        /*Offset to page zero of video RAM (From minorBaseOS).*/
  53.     short vpRowBytes;        /*Width of each row of video memory.*/
  54.     Rect vpBounds;            /*BoundsRect for the video display (gives dimensions).*/
  55.     short vpVersion;        /*PixelMap version number.*/
  56.     short vpPackType;
  57.     long vpPackSize;
  58.     long vpHRes;            /*Horizontal resolution of the device (pixels per inch).*/
  59.     long vpVRes;            /*Vertical resolution of the device (pixels per inch).*/
  60.     short vpPixelType;        /*Defines the pixel type.*/
  61.     short vpPixelSize;        /*Number of bits in pixel.*/
  62.     short vpCmpCount;        /*Number of components in pixel.*/
  63.     short vpCmpSize;        /*Number of bits per component*/
  64.     long vpPlaneBytes;        /*Offset from one plane to the next.*/
  65. };
  66.  
  67. typedef struct VPBlock VPBlock;
  68. typedef VPBlock *VPBlockPtr;
  69.  
  70. struct VDEntryRecord {
  71.     Ptr csTable;            /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
  72. };
  73.  
  74. typedef struct VDEntryRecord VDEntryRecord;
  75. typedef VDEntryRecord *VDEntRecPtr;
  76.  
  77. struct VDGrayRecord {
  78.     Boolean csMode;         /*Same as GDDevType value (0=mono, 1=color)*/
  79. };
  80.  
  81. typedef struct VDGrayRecord VDGrayRecord;
  82. typedef VDGrayRecord *VDGrayPtr;
  83.  
  84. /* Parm block for SetGray control call */
  85. struct VDSetEntryRecord {
  86.     ColorSpec *csTable;     /*Pointer to an array of color specs*/
  87.     short csStart;            /*Which spec in array to start with, or -1*/
  88.     short csCount;            /*Number of color spec entries to set*/
  89. };
  90.  
  91. typedef struct VDSetEntryRecord VDSetEntryRecord;
  92. typedef VDSetEntryRecord *VDSetEntryPtr;
  93.  
  94. /* Parm block for SetEntries control call */
  95.  
  96. struct VDPageInfo {
  97.     short csMode;            /*(word) mode within device*/
  98.     long csData;            /*(long) data supplied by driver*/
  99.     short csPage;            /*(word) page to switch in*/
  100.     Ptr csBaseAddr;         /*(long) base address of page*/
  101. };
  102.  
  103. typedef struct VDPageInfo VDPageInfo;
  104. typedef VDPageInfo *VDPgInfoPtr;
  105.  
  106. struct VDSizeInfo {
  107.     short csHSize;            /*(word) desired/returned h size*/
  108.     short csHPos;            /*(word) desired/returned h position*/
  109.     short csVSize;            /*(word) desired/returned v size*/
  110.     short csVPos;            /*(word) desired/returned v position*/
  111. };
  112.  
  113. typedef struct VDSizeInfo VDSizeInfo;
  114. typedef VDSizeInfo *VDSzInfoPtr;
  115.  
  116. struct VDSettings {
  117.     short csParamCnt;        /*(word) number of params*/
  118.     short csBrightMax;        /*(word) max brightness*/
  119.     short csBrightDef;        /*(word) default brightness*/
  120.     short csBrightVal;        /*(word) current brightness*/
  121.     short csCntrstMax;        /*(word) max contrast*/
  122.     short csCntrstDef;        /*(word) default contrast*/
  123.     short csCntrstVal;        /*(word) current contrast*/
  124.     short csTintMax;        /*(word) max tint*/
  125.     short csTintDef;        /*(word) default tint*/
  126.     short csTintVal;        /*(word) current tint*/
  127.     short csHueMax;         /*(word) max hue*/
  128.     short csHueDef;         /*(word) default hue*/
  129.     short csHueVal;         /*(word) current hue*/
  130.     short csHorizDef;        /*(word) default horizontal*/
  131.     short csHorizVal;        /*(word) current horizontal*/
  132.     short csHorizMax;        /*(word) max horizontal*/
  133.     short csVertDef;        /*(word) default vertical*/
  134.     short csVertVal;        /*(word) current vertical*/
  135.     short csVertMax;        /*(word) max vertical*/
  136. };
  137.  
  138. typedef struct VDSettings VDSettings;
  139. typedef VDSettings *VDSettingsPtr;
  140.  
  141.  
  142. #endif
  143.